<?

// Via paypal kunnen we ook meteen creditcards laten verwerken, extra kosten maken geen reet uit aangezien alles fictief is
function Display_PayPal_Option()
{
  $Output ='';
  $Output =$Output.'<table width="475" border="0" align="center">
  <tr>
    <td colspan="2"><FORM ACTION="MakePayment.php" METHOD="post">
      <div align="center">
	  <table width="95%" border="1" align="center">
        <tr> 
          <td><div align="center"><span class="RedBold">PayPal - Credit Cards</span></div></td>
        </tr>
        <tr><td><div align="center">
		  <span class="WhiteBold">Betalen via credit card of uw PayPal account. Beveiligde verbinding. </span>
		  <br><br><input type="submit" name="Submit" value="Klik hier om te betalen via PayPal"><br><br>
		  <a href="http://www.PayPal.com" target="_blank" class="nct">Powered By PayPal</a><br>
        </div></td>
      </tr>
      </table>
	  <INPUT TYPE="hidden" NAME="PayType" VALUE="PayPal">
      </div>
      </FORM> 
    </td>
  </tr>
  <tr bgcolor="#666666"> 
    <td colspan="2">&nbsp;</td>
  </tr>
</table>';
  return $Output;
}
// Knop om naar Paypal te gaan
function Display_PayPal_Button($Arr_PayPal,$Session_Prefix)
{
  $Output='';
  $Output=$Output.'<div align="center">Klik op de knop om naar een beveiligde server van PayPal te gaan</div>
   				<div align="center">
				<form name="PayPal" method="post" action="https://www.paypal.com/cgi-bin/webscr">
				  <table border="2" bordercolor="#FF0000">
                    <tr>
                      <td bgcolor="#FFFF00"><div align="center" class="">						   
  <input type="hidden" name="cmd" value="_cart">
  <input type="hidden" name="business" value="'.$Arr_PayPal['AccountEmail'].'">
  <input type="hidden" name="upload" value="1">
  <input type="hidden" name="currency_code" value="'.$Arr_PayPal["CurrencyCode"].'">
  ';

  $final = $_SESSION[$Session_Prefix.'Item_Count']+1;
  for ($i = 1; $i < $final; $i++)
  {
    $displayserialnum = "serialnum".$i;
    $displayshippinga = "shippinga".$i;
    $displayshippingb = "shippingb".$i;
    $displaytitle = "title".$i;
    $displayprice = "price".$i;
    $displayquantity = "quantity".$i;

    $Output = $Output.'
	
	<INPUT TYPE="hidden" NAME="item_name_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displaytitle].'">
	<INPUT TYPE="hidden" NAME="item_number_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayserialnum].'">
	<INPUT TYPE="hidden" NAME="amount_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayprice].'">
	
	<INPUT TYPE="hidden" NAME="shipping_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayshippinga].'">
	<INPUT TYPE="hidden" NAME="shipping2_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayshippingb].'">
	<INPUT TYPE="hidden" NAME="quantity_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayquantity].'">
	';
  }

  $Output = $Output.'  
  <input name="submit" type="submit" value="Klik hier om te betalen via PayPal.com">
                      </div></td>
                    </tr>
                  </table>
                </FORM>
	  			</div>';
  
  return $Output;
}
?>